/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.warehouse.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.warehouse.entity.BIWarehouseKpiData;
import com.thinkgem.jeesite.modules.warehouse.entity.WarehouseKpiMonitoring;
import com.thinkgem.jeesite.modules.warehouse.dao.WarehouseKpiMonitoringDao;

/**
 * 仓库KPI监控Service
 * @author hui.li
 * @version 2016-12-23
 */
@Service
@Transactional(readOnly = true)
public class WarehouseKpiMonitoringService extends CrudService<WarehouseKpiMonitoringDao, WarehouseKpiMonitoring> {

	@Autowired
	private  WarehouseKpiMonitoringDao dao;
	public WarehouseKpiMonitoring get(String id) {
		return super.get(id);
	}
	
	public List<WarehouseKpiMonitoring> findList(WarehouseKpiMonitoring warehouseKpiMonitoring) {
		return super.findList(warehouseKpiMonitoring);
	}
	
	public Page<WarehouseKpiMonitoring> findPage(Page<WarehouseKpiMonitoring> page, WarehouseKpiMonitoring warehouseKpiMonitoring) {
		return super.findPage(page, warehouseKpiMonitoring);
	}
	
	@Transactional(readOnly = false)
	public void save(WarehouseKpiMonitoring warehouseKpiMonitoring) {
		super.save(warehouseKpiMonitoring);
	}
	
	@Transactional(readOnly = false)
	public void delete(WarehouseKpiMonitoring warehouseKpiMonitoring) {
		super.delete(warehouseKpiMonitoring);
	}
	
	@Transactional(readOnly = false)
	public Page<BIWarehouseKpiData> findAllListBIWarehouseKpi(Page<BIWarehouseKpiData> page ,BIWarehouseKpiData data) {
		data.setPage(page);
		List<BIWarehouseKpiData> kpiList=dao.findAllListBIWarehouseKpi(data);
		page.setList(kpiList);
		return  page;
	}
	
	@Transactional(readOnly = false)
	public List<BIWarehouseKpiData> findAllListBIWarehouseKpiDE(BIWarehouseKpiData data) {
		List<BIWarehouseKpiData> kpiList=dao.findAllListBIWarehouseKpi2(data);
		return  kpiList;
	}
	
	@Transactional(readOnly = false)
	public Page<BIWarehouseKpiData> findAllListTemplateBIWarehouseKpi(Page<BIWarehouseKpiData> page ,BIWarehouseKpiData data) {
		data.setPage(page);
		List<BIWarehouseKpiData> kpiList=dao.findAllListTemplateBIWarehouseKpi(data);
		page.setList(kpiList);
		return  page;
	}
	

	@Transactional(readOnly = false)
	public List<BIWarehouseKpiData> syncWarehouseAttendance(BIWarehouseKpiData data) {
		List<BIWarehouseKpiData> kpiList=dao.findAllListTemplateBIWarehouseKpi2(data);
		return kpiList;
	}
	
	@Transactional(readOnly = false)
	public List<BIWarehouseKpiData> queryWarehouseAttendance() {
		List<BIWarehouseKpiData> kpiList = dao.queryWarehouseAttendance();
		return kpiList;
	}
	
	@Transactional(readOnly = false)
	public int updateStatus(BIWarehouseKpiData data) {
		return dao.updateStatus(data);
	}
}